<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="vue.global.js"></script>
</head>
<body>
    <div id = 'app'>
        1
    </div>
<script>

    let computed = {
        num(){
            return 123;
        }
    }

    let vm = {};
    for(let attr in computed){
        //添加只读属性
        Object.defineProperty(vm , attr , {
            value: computed[attr]()
        });
    }

    vm.num = 12311;

    //只读。且是属性
    console.log(vm);

</script>
</body>
</html>